import axios from "@/utils/request";

//获取频道列表接口
export const grtUserChannelListApi = () => {
  return axios({
    method: "GET",
    url: "/v1_0/user/channels",
  });
};

// 获取文章列表接口
export const getArticleListApi = (channel_id, timestamp) => {
  return axios({
    method: "GET",
    url: "/v1_0/articles",
    params: {
      channel_id,
      timestamp,
    },
  });
};

// 获取频道列表接口
export const grtAllChannelListApi = () => {
  return axios({
    method: "GET",
    url: "/v1_0/channels",
  });
};

// 频道_更新用户已选
export const updateUserChannelListApi = (channels) => {
  return axios({
    method: "PUT",
    url: "/v1_0/user/channels",
    data: {
      channels,
    },
  });
};
